<template>
  <div class="practice-page">
    <div class="page-header">
      <h1>练习</h1>
      <p class="subtitle">根据已学知识进行巩固练习</p>
    </div>

    <div class="entry-grid">
      <router-link class="entry-card quick" to="/smart-recommend">
        <div class="entry-icon">⚡</div>
        <div class="entry-title">快速开始</div>
        <div class="entry-desc">系统基于掌握度与遗忘曲线智能出题，一键进入练习</div>
      </router-link>

      <router-link class="entry-card manual" to="/learn">
        <div class="entry-icon">🧭</div>
        <div class="entry-title">自主选择</div>
        <div class="entry-desc">先选择分类/知识点与模式，再开始针对性练习</div>
      </router-link>
    </div>
  </div>
</template>

<script>
export default {
  name: 'UserPractice',
};
</script>

<style scoped>
.practice-page {
  padding: 100px 24px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.page-header h1 {
  margin: 0 0 8px 0;
}
.subtitle {
  color: #666;
  margin: 0 0 24px 0;
}
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.entry-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.entry-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}
.entry-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  display: block;
}
.entry-title {
  font-size: 1.2rem;
  color: #2c3e50;
  margin: 0 0 12px 0;
  font-weight: 600;
}
.entry-desc {
  font-size: 0.95rem;
  color: #7f8c8d;
  line-height: 1.5;
  margin: 0;
}
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.entry-card:nth-child(1) { animation-delay: 0.1s; }
.entry-card:nth-child(2) { animation-delay: 0.2s; }
@media (max-width: 640px) {
  .entry-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
</style>
